package com.cencat.user.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户权限创建DTO
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "用户权限创建请求")
public class UserPermissionCreateDTO {

    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户ID", required = true, example = "1")
    private Long userId;

    @NotNull(message = "权限ID不能为空")
    @Schema(description = "权限ID", required = true, example = "1")
    private Long permissionId;

    @Schema(description = "权限ID列表（批量授权时使用）")
    private List<Long> permissionIds;

    @Schema(description = "租户ID", example = "1")
    private Long tenantId;

    @Schema(description = "权限过期时间")
    private LocalDateTime expireTime;

    @Schema(description = "备注", example = "临时授权")
    private String remark;

    @Schema(description = "状态：1-有效，0-无效", example = "1")
    private Integer status = 1;
}